using GoogleMobileAds.Common.Mediation.Chartboost;
using UnityEngine;

namespace GoogleMobileAds.Android.Mediation.Chartboost
{
	public class ChartboostClient : IChartboostClient
	{
		private static ChartboostClient instance = new ChartboostClient();

		public static ChartboostClient Instance => instance;

		private ChartboostClient()
		{
		}

		public void RestrictDataCollection(bool shouldRestrict)
		{
			AndroidJavaObject @static = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
			AndroidJavaClass androidJavaClass = new AndroidJavaClass("com.chartboost.sdk.Chartboost");
			string str = shouldRestrict ? "true" : "false";
			MonoBehaviour.print("Calling 'Chartboost.restrictDataCollection()' with argument: " + str);
			androidJavaClass.CallStatic("restrictDataCollection", @static, shouldRestrict);
		}
	}
}
